package com.webserver.core;

import com.webserver.http.HttpServerletRequest;

import java.io.IOException;
import java.io.InputStream;
import java.net.Socket;
import java.util.HashMap;
import java.util.Map;

/**
 * 该线程任务负责与指定的客户端完成HTTP交互
 * 每次HTTP交互都需采取一问一答的规则，因此交互由三步来完成：
 * 1.解析请求
 * 2.处理请求
 * 3.发送响应
 */
public class ClientHandler implements Runnable{
    private Socket socket;
    public  ClientHandler(Socket socket){
        this.socket = socket;
    }
    @Override
    public void run() {
        try {
            // http://localhost:8088
            //1.解析请求
            HttpServerletRequest request = new HttpServerletRequest(socket);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }



}
